package com.guoyw.springboot.shardingsphere.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 用户信息
 */
@Data
@TableName("t_user")
public class User implements Serializable {
    
    private static final long serialVersionUID = 263434701950670170L;
    
    @TableId(value = "user_id",type = IdType.AUTO)
    private int userId;
    
    @TableField(value = "user_name")
    private String userName;
    
    @TableField(value = "user_name_plain")
    private String userNamePlain;
    
    @TableField(value = "pwd")
    private String pwd;
    
    @TableField(value = "assisted_query_pwd")
    private String assistedQueryPwd;
    
    @Override
    public String toString() {
        return String.format("user_id: %d, user_name: %s, user_name_plain: %s, pwd: %s, assisted_query_pwd: %s", userId, userName, userNamePlain, pwd, assistedQueryPwd);
    }
}
